package com.manage.result;

public class CodeMsg {
    private int code;
    private String msg;

    //通用异常
    public static CodeMsg SUCCESS = new CodeMsg(0, "Success");
    public static CodeMsg SERVER_ERROR = new CodeMsg(5000, "Server error");
    public static CodeMsg DB_SERVER_ERROR = new CodeMsg(5001, "Data Server error");
    public static CodeMsg PARAMS_ERROR = new CodeMsg(9000, "传递公共参数错误");


    // 登录异常 500010XX
    public static CodeMsg PHONE_EMPTY = new CodeMsg(50001000, "手机号不能为空");
    public static CodeMsg PHONE_ERROR = new CodeMsg(50001001, "手机号格式不正确");
    public static CodeMsg PHONE_HAS_NOT_BEEN_REGISTERED = new CodeMsg(50001002, "手机号未注册");
    public static CodeMsg PHONE_HAS_BEEN_REGISTERED = new CodeMsg(50001003, "手机号已被注册");
    public static CodeMsg PHONE_HAS_BEEN_MANY = new CodeMsg(50001004, "手机号异常请联系客服");
    public static CodeMsg PASSWORD_EMPTY = new CodeMsg(50001010, "密码不能为空");
    public static CodeMsg PASSWORD_ERROR = new CodeMsg(50001011, "密码不正确");

    public static CodeMsg NEW_PASSWORD_EMPTY = new CodeMsg(50001012, "新密码不能为空");
    public static CodeMsg NEW_PASSWORD_ERROR = new CodeMsg(50001013, "密码不正确");
    public static CodeMsg OLD_PASSWORD_EMPTY = new CodeMsg(50001012, "旧密码不能为空");
    public static CodeMsg OLD_PASSWORD_ERROR = new CodeMsg(50001013, "旧密码不正确");
    public static CodeMsg OLD_PASSWORD_LONG_ERROR = new CodeMsg(50001013, "旧密码不能小于6位");

    public static CodeMsg SERVER_SESSION_ERROR = new CodeMsg(50001030, "后台登录信息更新失效");
    public static CodeMsg SESSION_ERROR = new CodeMsg(50001031, "登录信息失效");

    //短信处理错误500011XX
    public static CodeMsg Send_SMS_ERROR = new CodeMsg(50001100, "短信发送失败");
    public static CodeMsg Send_SMS_INSERT_ERROR = new CodeMsg(50001101, "短信存库异常");
    public static CodeMsg Send_SMS_DEL_ERROR = new CodeMsg(50001102, "短信存库异常");
    public static CodeMsg Send_SMS_QUERY_ERROR = new CodeMsg(50001103, "短信发送异常");
    public static CodeMsg SMS_IS_ERROR = new CodeMsg(50001104, "验证码不正确");

    //用户反馈相关异常500020XX
    public static CodeMsg FEEDBACK_CONTENT_EMPTY = new CodeMsg(50002000, "反馈内容不能为空");


    //密保相关异常500030XX
    public static CodeMsg SECURITY_JSON_EMPTY = new CodeMsg(50003000, "密保不能为空");
    public static CodeMsg SECURITY_JSON_ADD_ERROR = new CodeMsg(50003001, "密保添加数据库错误");
    public static CodeMsg SECURITY_HAS_NOT_BEEN_SET_ = new CodeMsg(50003002, "密保未设置");
    public static CodeMsg SECURITY_ANSWER_ERROR = new CodeMsg(50003003, "密保问题回答错误");
    public static CodeMsg USER_ADD_ERROR = new CodeMsg(50003006, "用户添加数据库错误");


    private CodeMsg(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
